<%@ page language="java" contentType="text/html; charset=UTF-8"
	isELIgnored="false" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>
<%@ taglib uri="/mytag" prefix="yjd"%>
<div class="wrap J_check_wrap">
	<div class="nav">
		<div class="return">
			<a href='<yjd:url url="/adminrole/list"/>'>返回上一级</a>
		</div>
	</div>

	<form id="J_word_form" action='<yjd:url url="/adminrole/edit"/>' class="J_ajaxForm" method="post">
		<input type="hidden" name="id" value="${model.id }">
		<div class="h_a">设置角色组</div>
		<div class="table_full">
			<table width="100%">
				<tr>
					<th width="100">角色组名称：</th>
					<td><input name="name" type="text" class="input length_2"
						value="${model.name }"></td>
					<td><div class="fun_tips"></div></td>
				</tr>
			</table>
		</div>
		<div class="table_list">
			<table width="100%">
				<thead>
					<tr>
						<td width="60"><label><input type="checkbox"
								class="J_check_all">全选</label></td>
						<td width="30">ID</td>
						<td>菜单名称</td>
						<td>控制器</td>
						<td>动作</td>
						<td>URL</td>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${rootMenus }" var="m1">
					<tr style="font-weight: bold">
						<td><input type="checkbox" name="ids[]" value="${m1.id }"
							class="J_check" ${m1.strMap.checked?"checked='checked'":"" } /></td>
						<td>${m1.id }</td>
						<td>${m1.name }</td>
						<td>${m1.c }</td>
						<td>${m1.a }</td>
						<td>${m1.url }</td>
					</tr>
					<c:forEach items="${m1.strMap.childs }" var="m2">
					<tr>
						<td><input type="checkbox" name="ids[]" value="${m2.id }"
							class="J_check" ${m2.strMap.checked?"checked='checked'":"" } /></td>
						<td>${m2.id }</td>
						<td>└─ ${m2.name }</td>
						<td>${m2.c }</td>
						<td>${m2.a }</td>
						<td>${m2.url }</td>
					</tr>
					</c:forEach>
					</c:forEach>
				</tbody>
			</table>
		</div>

		<div class="btn_wrap">
			<div class="btn_wrap_pd">
				<label class="mr20"><input type="checkbox"
					class="J_check_all">全选</label>
				<button class="btn btn_submit J_ajax_submit_btn" type="button">保存</button>
			</div>
		</div>
	</form>
</div>
